package context.event;

import cn.stimd.spring.context.event.ApplicationListener;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public class NewsListener implements ApplicationListener<NewsEvent> {
    private String name;

    public NewsListener(String name) {
        this.name = name;
    }

    @Override
    public void onApplicationEvent(NewsEvent event) {
        System.out.println(name + "读 " + event.getSource());
    }
}
